import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.general.DefaultPieDataset;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * StatisticsFrame.java
 *
 * Created on 2009/12/14, 13:27:27
 */

/**
 *
 * @author ejiri
 */
public class StatisticsFrame extends javax.swing.JFrame {

    /** Creates new form StatisticsFrame */
    public StatisticsFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel4 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jPieChart1 = new org.jfree.beans.JPieChart();
        jPieChart2 = new org.jfree.beans.JPieChart();
        jBarChart1 = new org.jfree.beans.JBarChart();
        jPanel3 = new javax.swing.JPanel();
        jPieChart3 = new org.jfree.beans.JPieChart();
        jPieChart4 = new org.jfree.beans.JPieChart();
        jBarChart2 = new org.jfree.beans.JBarChart();
        jPanel5 = new javax.swing.JPanel();
        jPieChart5 = new org.jfree.beans.JPieChart();
        jPieChart6 = new org.jfree.beans.JPieChart();
        jBarChart3 = new org.jfree.beans.JBarChart();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Statistics"));

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Today"));

        jPieChart1.setPreferredSize(new java.awt.Dimension(230, 230));
        jPieChart1.setSubtitle("Today");
        jPieChart1.setTitle("Work/Break Time");

        javax.swing.GroupLayout jPieChart1Layout = new javax.swing.GroupLayout(jPieChart1);
        jPieChart1.setLayout(jPieChart1Layout);
        jPieChart1Layout.setHorizontalGroup(
            jPieChart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );
        jPieChart1Layout.setVerticalGroup(
            jPieChart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        jPieChart2.setPreferredSize(new java.awt.Dimension(230, 230));
        jPieChart2.setSubtitle("Today");
        jPieChart2.setTitle("Good/Bad Posture Time");

        javax.swing.GroupLayout jPieChart2Layout = new javax.swing.GroupLayout(jPieChart2);
        jPieChart2.setLayout(jPieChart2Layout);
        jPieChart2Layout.setHorizontalGroup(
            jPieChart2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );
        jPieChart2Layout.setVerticalGroup(
            jPieChart2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        jBarChart1.setCategoryAxisLabel("Event");
        jBarChart1.setLegendPosition(org.jfree.beans.LegendPosition.NONE);
        jBarChart1.setPreferredSize(new java.awt.Dimension(300, 230));
        jBarChart1.setSubtitle("Today");
        jBarChart1.setTitle("Event Count");
        jBarChart1.setValueAxisLabel("Count");

        javax.swing.GroupLayout jBarChart1Layout = new javax.swing.GroupLayout(jBarChart1);
        jBarChart1.setLayout(jBarChart1Layout);
        jBarChart1Layout.setHorizontalGroup(
            jBarChart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
        jBarChart1Layout.setVerticalGroup(
            jBarChart1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPieChart1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPieChart2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jBarChart1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPieChart1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPieChart2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBarChart1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        DefaultPieDataset data1 = new DefaultPieDataset();
        data1.setValue("Work", 90);
        data1.setValue("Break", 10);
        jPieChart1.setDataset(data1);
        DefaultPieDataset data2 = new DefaultPieDataset();
        data2.setValue("Good", 80);
        data2.setValue("Bad", 20);
        jPieChart2.setDataset(data2);
        DefaultCategoryDataset BarCdata1 = new DefaultCategoryDataset();
        BarCdata1.addValue(5,"",  "Warning");
        BarCdata1.addValue(1,"",  "Shut Down");
        BarCdata1.addValue(3,"",  "Break");
        jBarChart1.setDataset(BarCdata1);

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("This Week"));

        jPieChart3.setPreferredSize(new java.awt.Dimension(230, 230));
        jPieChart3.setSubtitle("This Week");
        jPieChart3.setTitle("Work/Break Time");

        javax.swing.GroupLayout jPieChart3Layout = new javax.swing.GroupLayout(jPieChart3);
        jPieChart3.setLayout(jPieChart3Layout);
        jPieChart3Layout.setHorizontalGroup(
            jPieChart3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );
        jPieChart3Layout.setVerticalGroup(
            jPieChart3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        jPieChart4.setPreferredSize(new java.awt.Dimension(230, 230));
        jPieChart4.setSubtitle("This Week");
        jPieChart4.setTitle("Good/Bad Posture Time");

        javax.swing.GroupLayout jPieChart4Layout = new javax.swing.GroupLayout(jPieChart4);
        jPieChart4.setLayout(jPieChart4Layout);
        jPieChart4Layout.setHorizontalGroup(
            jPieChart4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );
        jPieChart4Layout.setVerticalGroup(
            jPieChart4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        jBarChart2.setCategoryAxisLabel("Event");
        jBarChart2.setLegendPosition(org.jfree.beans.LegendPosition.NONE);
        jBarChart2.setPreferredSize(new java.awt.Dimension(300, 230));
        jBarChart2.setSubtitle("This Week");
        jBarChart2.setTitle("Event Count");
        jBarChart2.setValueAxisLabel("Count");

        javax.swing.GroupLayout jBarChart2Layout = new javax.swing.GroupLayout(jBarChart2);
        jBarChart2.setLayout(jBarChart2Layout);
        jBarChart2Layout.setHorizontalGroup(
            jBarChart2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
        jBarChart2Layout.setVerticalGroup(
            jBarChart2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 820, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPieChart3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPieChart4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jBarChart2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 240, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPieChart3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPieChart4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBarChart2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        DefaultPieDataset data3 = new DefaultPieDataset();
        data3.setValue("Work", 80);
        data3.setValue("Break", 20);
        jPieChart3.setDataset(data3);
        DefaultPieDataset data4 = new DefaultPieDataset();
        data4.setValue("Good", 90);
        data4.setValue("Bad", 10);
        jPieChart4.setDataset(data4);
        DefaultCategoryDataset BarCdata2 = new DefaultCategoryDataset();
        BarCdata2.addValue(22,"",  "Warning");
        BarCdata2.addValue(2,"",  "Shut Down");
        BarCdata2.addValue(20,"",  "Break");
        jBarChart2.setDataset(BarCdata2);

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("This Month"));

        jPieChart5.setPreferredSize(new java.awt.Dimension(230, 230));
        jPieChart5.setSubtitle("This Month");
        jPieChart5.setTitle("Work/Break Time");

        javax.swing.GroupLayout jPieChart5Layout = new javax.swing.GroupLayout(jPieChart5);
        jPieChart5.setLayout(jPieChart5Layout);
        jPieChart5Layout.setHorizontalGroup(
            jPieChart5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );
        jPieChart5Layout.setVerticalGroup(
            jPieChart5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        jPieChart6.setPreferredSize(new java.awt.Dimension(230, 230));
        jPieChart6.setSubtitle("This Month");
        jPieChart6.setTitle("Good/Bad Posture Time");

        javax.swing.GroupLayout jPieChart6Layout = new javax.swing.GroupLayout(jPieChart6);
        jPieChart6.setLayout(jPieChart6Layout);
        jPieChart6Layout.setHorizontalGroup(
            jPieChart6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );
        jPieChart6Layout.setVerticalGroup(
            jPieChart6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        jBarChart3.setCategoryAxisLabel("Event");
        jBarChart3.setLegendPosition(org.jfree.beans.LegendPosition.NONE);
        jBarChart3.setPreferredSize(new java.awt.Dimension(300, 230));
        jBarChart3.setSubtitle("This Month");
        jBarChart3.setTitle("Event Count");
        jBarChart3.setValueAxisLabel("Count");

        javax.swing.GroupLayout jBarChart3Layout = new javax.swing.GroupLayout(jBarChart3);
        jBarChart3.setLayout(jBarChart3Layout);
        jBarChart3Layout.setHorizontalGroup(
            jBarChart3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
        jBarChart3Layout.setVerticalGroup(
            jBarChart3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 230, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 820, Short.MAX_VALUE)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPieChart5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPieChart6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jBarChart3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 240, Short.MAX_VALUE)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPieChart5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPieChart6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBarChart3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        DefaultPieDataset data5 = new DefaultPieDataset();
        data5.setValue("Work", 80);
        data5.setValue("Break", 20);
        jPieChart5.setDataset(data5);
        DefaultPieDataset data6 = new DefaultPieDataset();
        data6.setValue("Good", 90);
        data6.setValue("Bad", 10);
        jPieChart6.setDataset(data6);
        DefaultCategoryDataset BarCdata3 = new DefaultCategoryDataset();
        BarCdata3.addValue(36,"",  "Warning");
        BarCdata3.addValue(4,"",  "Shut Down");
        BarCdata3.addValue(60,"",  "Break");
        jBarChart3.setDataset(BarCdata3);

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(30, 30, 30))
        );

        jPanel3.getAccessibleContext().setAccessibleName("This Week");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 878, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(56, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new StatisticsFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private org.jfree.beans.JBarChart jBarChart1;
    private org.jfree.beans.JBarChart jBarChart2;
    private org.jfree.beans.JBarChart jBarChart3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private org.jfree.beans.JPieChart jPieChart1;
    private org.jfree.beans.JPieChart jPieChart2;
    private org.jfree.beans.JPieChart jPieChart3;
    private org.jfree.beans.JPieChart jPieChart4;
    private org.jfree.beans.JPieChart jPieChart5;
    private org.jfree.beans.JPieChart jPieChart6;
    // End of variables declaration//GEN-END:variables

}
